# *args and **kwargs
# *args 可变长度 ，没有关键字参数
# **kwargs 可变长度，有关键字参数


def args_example(*args):
    print(type(args))  # 元组


args_example()


def args_example_1(*args):
    sum = 0
    for i in args:
        sum = sum + i
    print(sum)


args_example_1(1, 2, 3, 4)


def kwargs_example(**kwargs):
    print(type(kwargs))  # dict


kwargs_example()


def kwargs_example_1(**kwargs):
    print(kwargs.items())
    for d in kwargs.values():
        print(d)
    for d in kwargs.keys():
        print(d)


kwargs_example_1(keyword_1='a', keyword_2='b')
